package com.example.treehole.activity;

import android.annotation.SuppressLint;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.example.treehole.R;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class AboutActivity extends BaseActivity {


    @BindView(R.id.tv_head_line)
    TextView tvHeadLine;

    @Override
    protected int initLayout() {
        return R.layout.activity_about;
    }

    @Override
    protected void initData() {
        tvHeadLine.setText(getString(R.string.about_app));
    }


    @SuppressLint("NonConstantResourceId")
    @OnClick({R.id.rl_author_one, R.id.rl_author_two,R.id.iv_exit})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.iv_exit:
                finish();
                break;
            case R.id.rl_author_one:
                jumpTo("1600768105");
                break;
            case R.id.rl_author_two:
                jumpTo("1435020315");
                break;
        }
    }

    void jumpTo(String qq) {
        String address = "mqqwpa://im/chat?chat_type=wpa&version=1&uin=" + qq;
        Uri url2 = Uri.parse(address);
        Intent intent2 = new Intent();
        intent2.setAction("android.intent.action.VIEW");
        intent2.setData(url2);
        startActivity(intent2);
    }

}